package day13.practice;

/**
 * @Author juzipi
 * @Date 2021/6/29 11:37
 * @Info
 */
public class ObjectTest {

    public static void main(String[] args) {
        Order order = new Order();
        //getSuperclass 获取父类
        System.out.println(order.getClass().getSuperclass());
        try {
            Object clone = order.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        Object o = new Object();
        System.gc();
        System.out.println(order.getClass());
    }

}

class Order extends Object{

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
    }
}